﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using ProdService;
using ViewModels.Components;

namespace UI.ViewComponents
{
    public class Navigator : ViewComponent
    {
        private UserService userService;
        public Navigator(UserService userService)
        {
            this.userService = userService;
        }

        public IViewComponentResult Invoke()
        {
            NavigatorModel model = userService.GetNav();
            return View(nameof(Navigator).Prefix(), model);
        }
    }
}
